﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml;


namespace XMLAnalyser
{
    class Program
    {
        static void Main(string[] args)
        {
            Source_Code.XMLAnalyser xa = new Source_Code.XMLAnalyser("StopJob_Result.xml");
            
            Dictionary<XmlNode, XmlNode> dic = xa.GetElements("Runs/Run/Group/Group/Group/Group/Group/TestCase/Error/Exception");

            foreach (XmlNode node in dic.Keys)
            {
                Console.WriteLine(string.Format("VId: {0}, Level: {1}, Name: {2}, ErrorMessage: {3}", node.Attributes["VId"].Value, node.Attributes["Lvl"].Value, node.InnerText, dic[node].InnerText));
            }

        }
    }
}
